<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

  <div>
    <p class="c1">欢迎：
      <a id="d1" href="http://www.baidu.com">跳转到百度！！！</a>
    </p>
  </div>
  <div></div>

  <script !src="">
    /*按id查找*/
    var d1 = document.getElementById('d1');
    console.log(d1)

    /*按class查找*/
    var c1 = document.getElementsByClassName('c1')
    console.log(c1)

    /*按标签名查找*/
    var div = document.getElementsByTagName("div");
    console.log(div)


  </script>

</body>
</html>